package com.shamar.blog.dto;

import com.shamar.blog.entity.UserEmail;
import com.shamar.blog.enums.UserEmailStateEnum;

import java.util.List;

/**
 * 封装执行后结果
 */
public class UserEmailExecution {

	// 结果状态
	private int state;

	// 状态标识
	private String stateInfo;


	// 操作的标签（修改标签的时候用）
	private UserEmail userEmail;

	// 获取的标签列表(查询标签的时候用)
	private List<UserEmail> userEmailList;

	//空参构造器
	public UserEmailExecution() {
	}

	// 失败的构造器
	public UserEmailExecution(UserEmailStateEnum stateEnum) {
		this.state = stateEnum.getState();
		this.stateInfo = stateEnum.getStateInfo();
	}

	// 成功的构造器
	public UserEmailExecution(UserEmailStateEnum stateEnum, UserEmail userEmail) {
		this.state = stateEnum.getState();
		this.stateInfo = stateEnum.getStateInfo();
		this.userEmail = userEmail;
	}


	public int getState() {
		return state;
	}

	public void setState(int state) {
		this.state = state;
	}

	public String getStateInfo() {
		return stateInfo;
	}

	public void setStateInfo(String stateInfo) {
		this.stateInfo = stateInfo;
	}

	public UserEmail getUserEmail() {
		return userEmail;
	}

	public void setUserEmail(UserEmail userEmail) {
		this.userEmail = userEmail;
	}

	public List<UserEmail> getUserEmailList() {
		return userEmailList;
	}

	public void setUserEmailList(List<UserEmail> userEmailList) {
		this.userEmailList = userEmailList;
	}
}